Cho biểu thức: \(P=\frac{3x+3\sqrt{x}-3}{x+\sqrt{x}-2}-\frac{\sqrt{x}+1}{\sqrt{x}+2}+\frac{\sqrt{x}-2}{\sqrt{x}}\left(\frac{1}{1-\sqrt{x}}-1\right)\) với \(x>0;x\ne1\) .
a,Rút gọn P.
b, Tìm \(x\in Z\) để \(P\in Z\) .
c, Tìm x biết \(P=\sqrt{x}\) .